﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Test1 : MonoBehaviour {
    Rigidbody2D MyRightBody;
    // Use this for initialization
    void Start () {
        MyRightBody = GetComponent<Rigidbody2D>();
    }
	
	// Update is called once per frame
	void Update () {
		
	}
    void OnTriggerEnter2D(Collider2D other)
    {
        Debug.Log("被打了");
    }
    void OnTriggerStay2D(Collider2D other)
    {
        Debug.Log(2);
    }
    void OnCollisionEnter2D(Collision2D other)
    {
        Debug.Log("被打了1");
    }
}
